﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Entity
{
    public class EntityBase
    {
        public EntityBase()
        {
            this.Id = Guid.NewGuid();
            this.CreateTime = DateTime.Now;
        }

        /// <summary>
        ///  唯一标识符
        /// </summary>
        [Key]
        [Required]
        [Column("P01")]
        [DatabaseGenerated(DatabaseGeneratedOption.None)]
        public Guid Id { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        [Required]
        [Column("P02")]
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 锁定时间
        /// </summary>
        [Column("P03")]
        public DateTime? LockTime { get; set; }

        /// <summary>
        /// 删除时间
        /// </summary>
        [Column("P04")]
        public DateTime? DeleteTime { get; set; }
    }

}
